home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / TEX-UTIL / DVIPS_55 / dospk / gendospk next >
Text File  |  1994-03-29  |  4KB  |  78 lines

  1.  
  2. |     This is a sample batch file to run metafont, convert the GF file to
  3. |     the PK format and store the PK font in the appropriate directory. It
  4. |     is meant to be called by dviwin and that's the reason for the absence
  5. |     of any parameter checking. It also assumes that metafont and gftopk
  6. |     are operating properly. This sample file attempts to cover as many
  7. |     devices as possible; you will probably get better and faster results
  8. |     if you write a smaller and more specialized batch file.
  9. |
  10. |     The plain base is a prerequisite: make sure that you generate it by
  11. |     running inimf on plain.mf, then input the file modes.mf and finally
  12. |     dump the format file. If you don't know what I am talking about,
  13. |     please read the documentation that comes with the metafont program,
  14. |     as well as the Metafont book. You MAY need to modify this batch file
  15. |     if the name of your metafont program is not mf.
  16. |
  17. |     You WILL need to modify the routine to place the PK files in the
  18. |     proper directory; the current method uses the environment variable
  19. |     DVIFONTS which is assumed to contain the base directory for the PK
  20. |     fonts. Any square-pixel fonts are assumed to be stored in the
  21. |     directories  $(DVIFONTS)\X  where X is the resolution of the font.
  22. |     Non-square-pixel fonts are assumed to stored in the directories
  23. |     $(DVIFONTS)\XxY where X is the horizontal resolution and Y is the
  24. |     vertical resolution.
  25. |
  26. |     It is trivial to modify the name of metafont and the base directory;
  27. |     just select the proper values for the first two statements after
  28. |     these comments. If you use another directory structure, you need
  29. |     to modify the next two statements.
  30. |
  31. |     You may also need to do more modifications if you have other devices;
  32. |     this batch file generates fonts for the screen, 300dpi laser and
  33. |     inkjet printers, 600dpi laserjets, as well as 9-pin and 24-pin dot
  34. |     matrix printers. If you want to use another device, you will have to
  35. |     understand the code below and modify it accordingly (maybe you will
  36. |     want to rewrite the code in a compiled language to improve the speed,
  37. |     the error handling and avoid all the ugly gotos). If you want to use
  38. |     a 9-pin dot matrix printer at 120x144dpi or 240x144dpi, add the
  39. |     following lines to the file modes.mf and regenerate the plain base.
  40. |
  41. |     mode_def epsmed =                       % Epson-FX at 240x144dpi
  42. |             mode_param (pixels_per_inch, 240);
  43. |             mode_param (aspect_ratio, 144 / pixels_per_inch);
  44. |             EpsonMXFX_;
  45. |     enddef;
  46. |
  47. |     mode_def epswlo =                       % Epson-FX at 120x144dpi
  48. |             mode_param (pixels_per_inch, 120);
  49. |             mode_param (aspect_ratio, 144 / pixels_per_inch);
  50. |             EpsonMXFX_;
  51. |     enddef;
  52. |
  53. |     If metafont does not recognize any other modes, it will generate
  54. |     its standard proofing fonts which are HUGE and inappropriate for
  55. |     your device. In that case, get the file modes.mf from CTAN and
  56. |     generate the plain base again using the command:
  57. |             inimf plain;input modes;dump
  58. |     Then you need to copy plain.bas to the appropriate directory. You
  59. |     may need to replace "inimf" by "mf -i" for some Metafont versions.
  60. |
  61. |     Here are the parameters passed by dviwin:
  62. |             %1:     fontname        (truncated to 8 chars)
  63. |             %2:     magstep
  64. |             %3:     xres            (hor. resolution of font)
  65. |             %4:     yres            (vert. resolution of font)
  66. |             %5:     xbase           (base hor. resolution)
  67. |             %6:     ybase           (base vert. resolution)
  68. |             %7:     drive           (of current dvi file)
  69. |             %8:     path            (of current dvi file)
  70. |             %9:     gf extension    (truncated to 3 chars)
  71. |
  72. |     In most cases, you will only need to modify the next four statements:
  73. dir <rubbish$dir>
  74. |set PK_BASE <TexRoot>.f5.%0
  75. |set PK_DIR <PK_BASE>.%2pk
  76. set NAME %0
  77. if %4=%5 then obey <dos$genpk>.square %0 %1 %2 %2 %4 %5 %6 %7 %8 else obey <dos$genpk>.nsquare %0 %1 %2 %2 %4 %5 %6 %7 %8
  78.